Connection

interface Connection

Facilitates connections to the Rainbow Cloud Services. This module enables your application to authenticate users using their credentials and monitor the connection state with the Rainbow Cloud Services. Developers can utilize this module for establishing user sign-in procedures and managing the real-time state of connectivity with the Rainbow Services.

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Enumerates the states of the SDK's connection with Rainbow Cloud Services.

Link copied to clipboard

Enumerates error codes with their corresponding integer values.

Link copied to clipboard

Interface defining callbacks for handling various connection-related events and errors within the SDK.

Link copied to clipboard
interface ISignInListener

Interface representing callbacks for sign-in operations within the connection class.

Properties

Link copied to clipboard

Represents the current state of the Connection.

Functions

Link copied to clipboard
abstract fun fetchUserAuthenticationUrls(login: String, lang: String = Locale.getDefault().toLanguageTag(), listener: RainbowListener<AuthenticationUrl, Unit>)

Enables you to retrieve the authentication method linked to a user.

Link copied to clipboard

Registers an implementation of IConnectionListener to receive callbacks when the SDK's connection state changes.

Link copied to clipboard
abstract fun resetCacheAndDatabase()

Manually resets the image cache and database.

Link copied to clipboard
abstract fun signIn(login: String, password: String, listener: Connection.ISignInListener? = null)

Initiates a sign-in process using the provided login credentials.

abstract fun signIn(login: String, password: String, host: String? = null, listener: Connection.ISignInListener? = null)

Initiates a sign-in process using the provided login credentials and an optional custom host URL.

Link copied to clipboard
abstract fun signInWithMFACode(mfaCode: String, trusted: Boolean, listener: Connection.ISignInListener? = null)

Initiates a sign-in process using Multi-Factor Authentication (MFA) generated code.

Link copied to clipboard
abstract fun signInWithMFAVerification(mfaVerification: String, listener: Connection.ISignInListener? = null)

Initiates a sign-in process using Multi-Factor Authentication (MFA) verification code.

Link copied to clipboard
abstract fun signInWithOidcToken(token: String, listener: Connection.ISignInListener? = null)

Initiates a sign-in using the provided OpenID Connect (OIDC) token.

abstract fun signInWithOidcToken(token: String, host: String? = null, listener: Connection.ISignInListener? = null)

Initiates a sign-in using the provided OpenID Connect (OIDC) token and an optional host URL.

Link copied to clipboard
abstract fun signInWithToken(token: String, listener: Connection.ISignInListener? = null)

Initiates a sign-in process using the provided authentication token.

abstract fun signInWithToken(token: String, host: String? = null, listener: Connection.ISignInListener? = null)

Initiates a sign-in process using the provided authentication token and an optional custom host URL.

Link copied to clipboard
abstract fun signOut(listener: RainbowListener<Unit, Unit>? = null)

Signs out the current user.

Link copied to clipboard

Unregisters a previously registered IConnectionListener, stopping callbacks for SDK's connection state changes.